package cn.gok.dao;

import cn.gok.pojo.Category;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface CategoryMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Category record);

    int insertSelective(Category record);

    Category selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Category record);

    int updateByPrimaryKey(Category record);

    int insertCategoryParentIdAndName(@Param("parentId") Integer parentId, @Param("name") String name);

    int updateNameById(@Param("id") Integer Id,@Param("name") String name);

    List<Category> queryChildByParentId(Integer parentId);

    List<Category> queryCategoryByCategoryId(int categoryId);
}